package com.jash.labor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jash.labor.entity.Labor;
import com.jash.labor.mapper.provider.SqlLaborProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface LaborMapper extends BaseMapper<Labor> {

    //按id查询工人详情信息
    @Select("select name,sex,age,mobile from labor where id = #{id}")
    Labor selectLaborId(Integer id);

    //查询通过 自己分享    报名的工人数
    @SelectProvider(value = SqlLaborProvider.class,method = "laborQueryEnroll")
    IPage<HashMap> selectLaborEnroll(Page page,Integer id);


    //查询通过 自己分享   成功入职的工人
    @SelectProvider(value = SqlLaborProvider.class,method = "laborQueryCheck")
    IPage<HashMap> selectLaborCheck(Page page,Integer id);



    //提现信息查询
    @SelectProvider(value = SqlLaborProvider.class,method = "laborQueryCheckIs")
    IPage<HashMap> selectLaborCheckIs(Page page,Integer id);




}
